﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Lidgren.Network;
using Model.LiveControl;

namespace Network.Messages.LiveControl.S2C
{
    public class S2CResponseControlResultMessage : NovaMessage
    {

        public S2CResponseControlResultMessage() : base((ushort)CustomMessageType.S2CResponseControlResultMessage)
        {
        }
        public ResultType Result;
        public FormItemModel FormItemModel;
        public override void WritePayload(NetOutgoingMessage message)
        {
            base.WritePayload(message);
            FormItemModel.WritePayload(message);
            message.Write((int)Result);
        }

        public override void ReadPayload(NetIncomingMessage message)
        {
            base.ReadPayload(message);
            FormItemModel.ReadPayload(message);
            Result = (ResultType)message.ReadInt32();
        }
    }
}
